package cn.com.b2office.service.impl;

import java.util.List;

import cn.com.b2office.bean.ItemQueryParam;
import cn.com.b2office.dao.ItemDao;
import cn.com.b2office.domain.Item;
import cn.com.b2office.service.ItemRankService;

public class ItemRankServiceImpl implements ItemRankService {

	// private Map<String, List<String>> rank = new HashMap<String,
	// List<String>>();

	// private RankDao rankDao = null;

	private ItemDao itemDao = null;

	// private Date lastDate = null;

	public List<Item> getRank(String categoryId, int size) {
		// return rank.get(categoryId);
		ItemQueryParam param = new ItemQueryParam();
		param.setCategoryId(categoryId);
		param.setPageSize(size);
		return itemDao.queryItems(param);
	}

	public void refreshRank() {
		// List<OrderItem> list = rankDao.findOrderItems(lastDate, null);
	}

	// public void setRankDao(RankDao rankDao) {
	// this.rankDao = rankDao;
	// }

	public void setItemDao(ItemDao itemDao) {
		this.itemDao = itemDao;
	}

}
